/**
 * @description 定义购物车相关api
 */

import { CART_ADD_URL, CART_LIST_URL } from "../config/urls.cfg";
import request from "./ajax";
/**
 * 添加购物车
 * @param data 商品数据信息
 * @returns 
 */
export function cartAddApi(data:any){
    return request({
        url: CART_ADD_URL,
        method: 'PUT',
        data
    })
}
/**
 * 购物车列表
 * @param uid 用户id
 * @returns 
 */
export function cartListApi(uid:string){
    return request({
        url: CART_LIST_URL,
        params: {uid}    
    })
}